package cn.iocoder.yudao.module.call.service.ivrknowledgeissue;

import java.util.*;
import javax.validation.*;

import cn.hutool.json.JSONObject;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.call.controller.admin.ivrknowledgeissue.vo.*;
import cn.iocoder.yudao.module.call.controller.open.ivrlearn.vo.IvrLearnSaveByFlowReqVO;
import cn.iocoder.yudao.module.call.dal.dataobject.ivrknowledgeissue.IvrKnowledgeIssueDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.call.dal.dataobject.ivrknowledgeissuevoice.IvrKnowledgeIssueVoiceDO;
import org.springframework.scheduling.annotation.Async;

/**
 * ivr-知识库问题 Service 接口
 *
 * @author 数创万维
 */
public interface IvrKnowledgeIssueService {

    void delKnowledgeIssueVoiceById(Long id);

    void delKnowledgeIssueVoiceByFlowId(Long flowId);

    void knowledgeIssueVoiceByIdCreate(IvrKnowledgeIssueVoiceDO createReqVO);

    void knowledgeIssueVoiceByIdCreateManual(IvrKnowledgeIssueVoiceDO createReqVO);

    void knowledgeIssueVoiceListCreate(IvrKnowledgeIssueVoiceDO createReqVO);

    List<JSONObject> KnowledgeIssueByFlowId(Long flowId);

    @Async
    CommonResult<Long> addIvrKnowledge(IvrLearnSaveByFlowReqVO ivrLearnSaveByFlowReqVO);

    Long createIvrKnowledgeIssueList(List<IvrKnowledgeIssueSaveReqListVO> createReqVO,  Long ivrFlowId,String voiceType);

    /**
     * 创建ivr-知识库问题
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createIvrKnowledgeIssue(@Valid IvrKnowledgeIssueSaveReqVO createReqVO);

    void updateIvrKnowledgeIssueType(IvrKnowledgeIssueSaveReqVO updateReqVO);

    /**
     * 更新ivr-知识库问题
     *
     * @param updateReqVO 更新信息
     */
    void updateIvrKnowledgeIssue(@Valid IvrKnowledgeIssueSaveReqVO updateReqVO);

    /**
     * 删除ivr-知识库问题
     *
     * @param id 编号
     */
    void deleteIvrKnowledgeIssue(Long id);

    /**
     * 获得ivr-知识库问题
     *
     * @param id 编号
     * @return ivr-知识库问题
     */
    IvrKnowledgeIssueDO getIvrKnowledgeIssue(Long id);

    /**
     * 获得ivr-知识库问题分页
     *
     * @param pageReqVO 分页查询
     * @return ivr-知识库问题分页
     */
    PageResult<IvrKnowledgeIssueDO> getIvrKnowledgeIssuePage(IvrKnowledgeIssuePageReqVO pageReqVO);

    void initDefaultKnowledge();
}